/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package com.googlecode.ivybeans.module.nodes;

import com.googlecode.ivybeans.module.resources.ResourcesAccess;
import javax.swing.JButton;
import org.openide.util.NbBundle;

/**
 *
 * @author lforet
 */
public class AddLibraryPanel extends javax.swing.JPanel {

    private JButton okButton;

    /** Creates new form AddLibraryPanel */
    public AddLibraryPanel() {
        initComponents();
        okButton = new JButton(NbBundle.getMessage( ResourcesAccess.class, "BTN_OK"));
    }
    
    public JButton getOkButton() {
        return okButton;
    }

    public String getOrg() {
        return orgTxt.getText().trim();
    }
    
    public String getLibraryName() {
        return nameTxt.getText().trim();
    }
    
    public String getRevision() {
        return revisionTxt.getText().trim();
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        orgLbl = new javax.swing.JLabel();
        nameLbl = new javax.swing.JLabel();
        revisionLbl = new javax.swing.JLabel();
        orgTxt = new javax.swing.JTextField();
        nameTxt = new javax.swing.JTextField();
        revisionTxt = new javax.swing.JTextField();

        orgLbl.setText(org.openide.util.NbBundle.getMessage(AddLibraryPanel.class, "AddLibraryPanel.orgLbl.text")); // NOI18N

        nameLbl.setText(org.openide.util.NbBundle.getMessage(AddLibraryPanel.class, "AddLibraryPanel.nameLbl.text")); // NOI18N

        revisionLbl.setText(org.openide.util.NbBundle.getMessage(AddLibraryPanel.class, "AddLibraryPanel.revisionLbl.text")); // NOI18N

        orgTxt.setText(org.openide.util.NbBundle.getMessage(AddLibraryPanel.class, "AddLibraryPanel.orgTxt.text")); // NOI18N

        nameTxt.setText(org.openide.util.NbBundle.getMessage(AddLibraryPanel.class, "AddLibraryPanel.nameTxt.text")); // NOI18N

        revisionTxt.setText(org.openide.util.NbBundle.getMessage(AddLibraryPanel.class, "AddLibraryPanel.revisionTxt.text")); // NOI18N

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(revisionLbl)
                    .add(nameLbl)
                    .add(orgLbl))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(revisionTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 129, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(orgTxt, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)
                    .add(nameTxt))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(orgLbl)
                    .add(orgTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(nameLbl)
                    .add(nameTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(revisionLbl)
                    .add(revisionTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel nameLbl;
    private javax.swing.JTextField nameTxt;
    private javax.swing.JLabel orgLbl;
    private javax.swing.JTextField orgTxt;
    private javax.swing.JLabel revisionLbl;
    private javax.swing.JTextField revisionTxt;
    // End of variables declaration//GEN-END:variables
}
